#coding=utf-8
'''
# @Name:student_info
# @author:mysouil
# @Description:
# @DATE:2022/12/18 18:41
# @Modified By:
'''

from comment.models import db

class StudentInfo(db.Model):
    __tablename__ = 't_student'
    # 班级id
    id = db.Column(db.BIGINT, primary_key=True, autoincrement=True)
    # 学生名称
    name = db.Column(db.String(64), comment='学生名称')
    # 曾用名
    formerName = db.Column(db.String(64), comment='曾用名')
    # 性别
    gender = db.Column(db.String(4),comment='性别')
    # 年龄
    age = db.Column(db.Integer,comment='年龄')
    # 身份证号
    card_id = db.Column(db.String(11),comment='身份证号')
    # 民族
    nation = db.Column(db.String(4),comment='民族')
    # 专业
    major = db.Column(db.String(64), comment='专业')
    # 地区
    place = db.Column(db.Text,comment='地区')
    classes_id = db.Column(db.BIGINT, db.ForeignKey('t_classes.id'), comment='班级id')
    classes = db.relationship('Classes',backref=db.backref('student_info', lazy=True, uselist=True))